﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace mypaint
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : RibbonWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            
        }

        private void RibbonWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var pop = mainMenu.Template.FindName("PART_Popup", mainMenu) as Popup;
            //pop.IsOpen = true;

            var btn = mainMenu.Template.FindName("PART_ToggleButton", mainMenu) as RibbonToggleButton;
        }

        private void PART_PopupToggleButton_Click(object sender, RoutedEventArgs e)
        {
            RibbonToggleButton button = sender as RibbonToggleButton;
            MessageBox.Show(mainMenu.IsDropDownPositionedAbove+"");
        }
    }
}
